<extend name="Layout:layout_list" />
<block name="body_content_block">
    <table id="main_grid" class="easyui-datagrid" data-url="{:AddonU('MeetingRoom/get_meetingroom_list_json')}"></table>
    <div id="tb" style="padding:2px 5px;">
        <div style="margin-bottom: 5px; border-bottom:solid 1px #dddddd;">
            <a href="{:AddonU('MeetingRoom/item_edit')}" class="easyui-linkbutton lnk_grid_add" iconCls="icon-add" plain="true">新增</a>
            <if condition="$isSuperAdmin">
                <a href="{:AddonU('MeetingRoom/item_delete','id=varid')}" class="easyui-linkbutton lnk_grid_remove" iconCls="icon-remove" plain="true" data-success-fn="show_reload_tip">删除</a>
            </if>
        </div>
    </div>
</block>
<block name="body_after_block">
    <script type="text/javascript">
        // 页面初始化
        var curd_grid = CurdGrid.newInstance();
        curd_grid.config({
            title: '会议室管理',
            toolbar: '#tb',
            columns: [[
                    {field: 'ck', checkbox: true},
                    {title: "租户ID", field: "siteIDText", sortable: true},
                    {title: "会议名称", field: "description", sortable: true},
                    {title: "会议号码", field: "exten", sortable: true},
                    {title: "创建时间", field: "create_time", sortable: true},
                    {title: "编号", field: "id", hidden: true},
                ]],
            rowStyler: function (index, row) {
                if (row.payTypeText == '后付费') {
                    return 'background-color:#FFDDAA;';
                }
            }
        });
        curd_grid.init();
    </script>
</block>